package com.cskaoyan.javase.oop3._1interface._5extend;

/**
 * 链式调用
 * @since 15:46
 * @author wuguidong@cskaoyan.onaliyun.com
 */
public class Demo2 {
    public static void main(String[] args) {
        new Student().getStudent().getTeacher().show();
    }
}

class Student {

    public Student getStudent() {
        return new Student();
    }

    public Teacher getTeacher() {
        return new Teacher();
    }

    public Student() {
    }
}

class Teacher {
    public int show() {
        System.out.println("秀一波~~~");
        return 0;
    }
}
